package com.letoken.platform.pub.util;

import cn.hutool.core.util.StrUtil;
import com.letoken.platform.pub.constant.LetokenUserConstant;

/**
 * @author wyl
 * @Description 工具类
 * @date 2022/12/31 17:09
 * @Version 1.0
 */
public class LeTokenUtil {


    /**
     * 裁剪用户id开头的"le"字符串
     * @param userId
     * @return
     */
    public static String appUserIdStartsWithLe(String userId){
        if (StrUtil.isNotBlank(userId)){
            if (StrUtil.startWithAnyIgnoreCase(userId, LetokenUserConstant.USER_ID_PREFIX)){
                userId = userId.substring(2);
            }
        }
        return userId;
    }
}
